<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="./common.jsp" %>
<%
String dhxskin = "dhx_skyblue";
%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title><%="zh".equalsIgnoreCase(lang) ? "表单设计预览" : "Form Designer Preview"%></title>
<link rel="shortcut icon" href="<%=resloc%>/favicon.ico" />
<link href="<%=resloc%>/static/formskins/bootstrap-blue/css/bootstrap.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/default/css/module/custom.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/bootstrap-blue/css/font-awesome.css?<%=dver%>" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<%= resloc %>/static/formskins/default/css/module/css.css?<%=dver%>"/>
<link rel="stylesheet" type="text/css" href="<%= resloc %>/static/formskins/default/js/jqueryui/css/jquery.ui.min.css?<%=dver%>">
<link href="<%=resloc%>/static/formskins/default/css/module/default.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/bootstrap-blue/css/timepicker.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/bootstrap-blue/css/bootstrap-datetimepicker.min.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/css/jqueryui1.10.4/themes/base/jquery.ui.all.css?<%=dver%>" rel="stylesheet">

<link href="<%=resloc%>/static/formskins/default/css/module/003popupinput.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/default/css/module/004textarea.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/default/css/module/006checkbox.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/default/css/module/007select.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/default/css/module/010datepicker.css?<%=dver%>" rel="stylesheet">
<link href="<%=resloc%>/static/formskins/default/css/module/201customhtml.css?<%=dver%>" rel="stylesheet">

<%-- <link rel="stylesheet" href="<%=resloc%>/static/css/dhtmlx3/dhtmlx_classic.css?<%=dver%>"> --%>
<link rel="stylesheet" href="<%=resloc%>/static/css/dhtmlx3/dhtmlx.css?<%=dver%>">
<link href="<%=resloc%>/static/formskins/default/css/module/101dhxgrid.css?<%=dver%>" rel="stylesheet">

<script src="<%=resloc%>/static/js/jquery/jquery-1.10.2.js?<%=dver%>"></script>
<script src="<%=resloc%>/static/js/jquery/jquery.tipsy.js?<%=dver%>"></script>
<script type="text/javascript" src="<%= resloc %>/static/js/jquery/jquery-form.js?<%=dver%>"></script>

<script type="text/javascript" src="<%= resloc %>/static/formskins/default/js/jqueryui/js/jquery-ui-1.10.4.custom.min.js?<%=dver%>"></script>

<script type="text/javascript" src="<%= resloc %>/static/js/jquery-ui1.10.4/jquery.ui.core.js?<%=dver%>"></script>
<script type="text/javascript" src="<%= resloc %>/static/js/jquery-ui1.10.4/jquery.ui.widget.js?<%=dver%>"></script>
<script type="text/javascript" src="<%= resloc %>/static/js/jquery-ui1.10.4/jquery.ui.position.js?<%=dver%>"></script>
<script type="text/javascript" src="<%= resloc %>/static/js/jquery-ui1.10.4/jquery.ui.menu.js?<%=dver%>"></script>
<script type="text/javascript" src="<%= resloc %>/static/js/jquery-ui1.10.4/jquery.ui.autocomplete.js?<%=dver%>"></script>

<script type="text/javascript" src="<%= resloc %>/static/js/3rdpartyother/angular-all.min.js?<%=dver%>"></script>
<%-- <script type="text/javascript" src="<%= resloc %>/preview/angular-helper.js?<%=dver%>"></script> --%>
<script src="<%=resloc%>/static/formskins/bootstrap-blue/js/bootstrap.min.js?<%=dver%>" type="text/javascript"></script>

<script src="<%=resloc%>/static/formskins/bootstrap-blue/js/bootstrap-datetimepicker.js?<%=dver%>" type="text/javascript"></script>
<script src="<%=resloc%>/static/formskins/bootstrap-blue/js/bootstrap-timepicker.js?<%=dver%>" type="text/javascript"></script>
<script src="<%=resloc%>/static/formskins/bootstrap-blue/js/locales/bootstrap-datetimepicker.zh-CN.js?<%=dver%>" type="text/javascript"></script>

<script src="<%=resloc%>/static/js/dhtmlx3/dhtmlx.js?<%=dver%>"></script>
<script src="<%=resloc%>/static/js/dhtmlx3/ext/dhxgrid.js?<%=dver%>"></script>
<script src="<%=resloc%>/static/js/dhtmlx3/ext/excell_types.js?<%=dver%>"></script>
<script src="<%=resloc%>/static/js/dhtmlx3/ext/validator.js?<%=dver%>"></script>
<script src="<%=resloc%>/static/js/dhtmlx3/ext/dhx_i18n_<%=lang%>.js?<%=dver%>"></script>

<script type="text/javascript">
var isPreview = true;

var ctxpath = '<%=path%>';
var resloc = '<%=resloc%>';
var bpmpCtx  = '<%=bpmpCtx%>';
var fmdCtx = '<%=fmdCtx%>';
var lang = '<%=lang%>';
var loginName = '<%=loginName%>';
var displayName = '<%=displayName%>';
var imagepath = resloc + '/static/images/';
dhtmlx.image_path = resloc + '/static/css/dhtmlx3/imgs/';
dhx_skin = "<%=dhxskin%>";

$(document).ready(function(){
	fmdf.getData(ctxpath, fmdCtx, "test_tsid", $('.content')[0]);
	fmdf.dhxgridToExcel = function(piId, uiid, uiidg, model, columns, defaults){}
});
</script>
<style type="text/css">
/* 解决Angular 初始化闪烁 */
.ng-cloak1{
	visibility:hidden !important;
}
</style>
</head>

<body>
<div class='wait'>
	<div>
		<div><img src='<%= resloc %>/static/formskins/default/css/images/loading.gif'></div>
		<div>请耐心等待...</div>
	</div>
</div>
<!-- <form autocomplete="off" > -->
<!-- <div class="form"> -->

    <%@ include file="./eheader.jsp" %>
    <div class="content contentA" id="_pageMain" ng-controller="datactx">
        
        <% String formfile = (String)request.getAttribute("formfile");
        if (formfile!=null && formfile.trim().length()>0) {%>
        <jsp:include page="<%=formfile%>" ></jsp:include>
        <%} %>
        
    </div>
    
    <div class="content contentA" id="_pageDiagram" style="display:none">
       <div class="img" id="div_bpdDiagram" >
          <div id="_popMsg" style="display:none; border:#ccc solid 1px; width:250px; height:110px;border-radius:3px;position:absolute;z-index:10;background:#ffff99;padding:3px;"></div>
          <div id="img_bpdPath" style="display:none;font-family:微软雅黑; font-size:16px;font-weight:bold;position:absolute;top:0px;left:30px;z-index:10000"></div>
	   </div>
    </div>
	
    <%@ include file="./footer.jsp" %>
<!-- </div> -->

<!-- </form> -->

<script type="text/javascript">
//GET方式访问一个url，并取得JSON数据
//do get to an url and get data
function doGetAsyncJson(url, callbackFunc, errFunc) {
	return jQuery.ajax({
		url : encodeURI(url),
		async : true,
		cache : false,
		type : "GET",
		dataType : "json",
		success : function(_data){
			if (typeof(callbackFunc)=="function") {
				callbackFunc(_data);
			}
		},
		error: (typeof(errFunc) == "function") ? errFunc : function(xhr, textstate, errthr) {
			fmdf.alert("error", "对不起，读取数据失败！请联系系统管理人员！Error: [" + textstate + "]: " + errthr)
		}
	});
}

//GET方式访问一个url，并取得JSON数据
//do get to an url and get data
function doGetSyncJson(url, inputData, errFunc) {
	var rtndata = null;
	var args = {
			url : encodeURI(url),
			async : false,
			cache : false,
			type : "GET",
			dataType : "json",
			success : function (data) {
				rtndata = data;
			},
			error: (typeof(errFunc) == "function") ? errFunc : function(xhr, textstate, errthr) {
				fmdf.alert("error", "对不起，读取数据失败！请联系系统管理人员！Error: [" + textstate + "]: " + errthr)
			}
		};
	inputData && (args.data = inputData);
	jQuery.ajax(args);
	return rtndata;
}

//POST方式访问一个url，并取得JSON数据
//post form data to an url and get data
function doPostSyncJson(url, inputData, errFunc) {
	var rtndata = null;
	$.ajax({
		contentType:'application/x-www-form-urlencoded',
		url : encodeURI(url),
		async : false,
		cache : false,
		type : "POST",
		data : inputData,
		dataType : "json",
		success : function (data) {
			rtndata = data;
		},
		error: (typeof(errFunc) == "function") ? errFunc : function(xhr, textstate, errthr) {
			fmdf.alert("error", "对不起，读取数据失败！请联系系统管理人员！Error: [" + textstate + "]: " + errthr)
		}
	});
	return rtndata;
}
function doPostAsyncJson(url, inputData, callbackFunc, errFunc) {
	return jQuery.ajax({
		url: encodeURI(url),
		async: true,
		cache: false,
		type: "POST",
		data: inputData,
		dataType: "json",
		success: function(_data) {
			if (typeof(callbackFunc) == "function") {
				callbackFunc(_data)
			}
		},
		//complete: fm_checkSession,
		error: (typeof(errFunc) == "function") ? errFunc : function(xhr, textstate, errthr) {
			fmdf.alert("error", "对不起，读取数据失败！请联系系统管理人员！Error: [" + textstate + "]: " + errthr)
		}
	})
}
function stopEvent(e){
	if (e && e.stopPropagation!=undefined) {
		e.stopPropagation();
	} else if (window.event){
		window.event.cancelBubble = true;
	}
	return false;
}
</script>
</body>
</html>
